Calibration of imaging device for biological/chemical samples

ABSTRACT

Methods, apparatuses, and systems for imaging biological/chemical samples are provided. A calibrated imaging system can allow a user to obtain an optimal focus setting (position) for any effective distance (e.g. a zoom setting). The optimal focus can be determined from a functional approximation that defines a relationship between effective distance and focus setting. A user can input a size, and an imaging system can determine the appropriate effective distance and focus. An imaging system can also determine a size based on any effective distance. A flat-field correction can also be determined for any effective distance or size.

CROSS-REFERENCES TO RELATED APPLICATIONS

The present application claims the benefit of priority under 35 U.S.C.§119 from U.S. Provisional Patent Application Ser. No. 61/184,022,entitled “Calibration of Imaging Device for Biological/ChemicalSamples,” filed on Jun. 1, 2009, the disclosure of which is herebyincorporated by reference in its entirety for all purposes.

BACKGROUND

The present invention relates generally to imaging ofbiological/chemical samples, and more particularly to calibrating animaging system to focus on the samples.

Biological and chemical samples may be imaged for any number of reasons.For example, the images may be used to identify a certain cellstructure, ranging from malignant tumors to specific chromosomes in aDNA sequence. Typically, gels and blots containing, e.g., polyacrylamideor agarose, are used to hold the molecules of a sample. The sample maybe marked with fluorescent dyes that can help in the identificationand/or characterization of the molecules in the image, which can includea location of a molecule. For example, a sample may be organized intodifferent sections based on properties of the molecules in the sample,e.g., as a result of electrophoresis. Thus, a location of the specificmolecule and the color and intensity of light that a molecule reflectsor emits can be used in the identification and characterization of asample. However, it is often difficult to obtain a good image of asample, which can reduce the accuracy of measurements andcharacterization of the molecules.

Therefore, it is desirable to provide new methods and systems that allowfor accurate imaging and that are relatively easy to implement.

BRIEF SUMMARY

Embodiments of the invention include methods, apparatuses, and systemsfor imaging biological/chemical samples. A calibrated imaging system canallow a user to obtain an optimal focus setting (position) for anyeffective distance (e.g. a zoom setting). Thus, a user can obtain anaccurate and reproducible image for any effective distance, which can inturn allow any desired image size, thereby also providing greateraccuracy since the sample can be imaged to a greater resolution. In oneembodiment, the optimal focus is determined from a functionalapproximation that defines a relationship between effective distance andfocus setting. Also, a user can input a size, and an imaging system candetermine the appropriate effective distance and focus. An imagingsystem can also determine a size based on any effective distance. Anaccurate flat field correction can also be determined.

According to one embodiment, a method for calibrating an imaging systemfor imaging biological or chemical samples is provided. A plurality ofinitial effective distances from an optical component of the imagingsystem to a sample location are used. For each initial effectivedistance, an optimal focus setting of the optical component isidentified. Means (e.g. data and/or software code) for the imagingsystem to determine a first functional approximation that is derivedfrom the optimal focus settings at the initial effective distances isstored in at least one computer readable medium that is adapted to becommunicably coupled with the imaging system. The first functionalapproximation can be used to calculate an optimal focus setting for anew effective distance that is not one of the initial effectivedistances.

According to another embodiment, an imaging system for imagingbiological or chemical samples is provided. The imaging system includesan optical component having a plurality of focus settings; a means ofchanging an effective distance from the optical component to abiological or chemical sample, a processor configured to map anyeffective distance to an optimal focus setting; and a controllerconfigured to set the optical component to have the optimal focussetting that maps to a selected effective distance.

According to another embodiment, a method of determining a size of abiological or chemical sample using an imaging system is provided. Aninput effective distance between an optical component of the imagingsystem and the sample is received. The imaging system obtains a mappingof any effective distance to a corresponding size. The imaging systemdetermines the size that corresponds to the input effective distancebased on the mapping. The size can then be provided to the user.

Other embodiments of the invention are directed to systems and computerreadable media associated with methods described herein.

As used herein, the term “optimal” can refer to any setting that ischosen for having better properties than another setting. The settingdoes not have to the best possible setting, but is chosen over anothersetting based on some criteria. In one embodiment, the optimal settingis determined with an optimization method to within a desired accuracy.

As used herein, the term “effective distance” refers to actual distanceor a simulated distance from an optical component (e.g. a lens) to asample location, where an actual sample or a calibration target may beplaced. The simulated distance may be a result of magnification (e.g. anoptical zoom of a lens).

As used herein, the term “functional approximation” refers to anyfunction(s) that can receive an input parameter and provide acorresponding parameter. Examples of parameters include a size of asample and a setting of the imaging system. In some embodiments, aninput parameter provided by a user can be taken as is, with a uniquecorresponding parameter being identified. In other embodiments, thevalue of an input parameter is shifted to a new value and then thecorresponding setting is identified. Here, different input parameterscan correspond to a same setting In such embodiments, the new parametercan be almost the same as the input parameter, and thus little accuracymay be lost. This embodiment can be when the functional approximation isformulated as a list of effective distances with corresponding focussettings, which can be derived from a smaller list of initial effectivedistances for which optimal focus settings have been determined.

A better understanding of the nature and advantages of the presentinvention may be gained with reference to the following detaileddescription and the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows an imaging system for imaging chemical or biologicalsamples according to embodiments of the present invention.

FIG. 2A is a flowchart illustrating a method for calibrating an imagingsystem for imaging biological or chemical samples according toembodiments of the present invention.

FIGS. 2B and 2C shows methods of storing means for determining afunctional approximation to the relationship of an effective distance tooptimal focus setting according to embodiments of the present invention.

FIG. 3 shows a plot illustrating functional approximations (curves asshown) resulting from a functional fit of data points of optimal focuspoints at varying initial effective distances and offset corrections ofsuch curves according to an embodiments of the present invention.

FIG. 4 is a flowchart of a method for determining an optimal focus at aparticular effective distance setting according to embodiments of thepresent invention.

FIG. 5 shows a plot of the FCV vs. a focus setting (position) accordingto embodiments of the present invention.

FIG. 6A shows a histogram of pixel intensity (in a monochrome scale) vs.pixel count for one or more unfocused images according to embodiments ofthe present invention.

FIG. 6B shows a histogram of pixel intensity (in a monochrome scale) vs.pixel count for one or more focused images according to embodiments ofthe present invention.

FIG. 7 is a flowchart illustrating a method mapping an effectivedistance to a size of a sample according to embodiments of the presentinvention.

FIG. 8 provides a visualization of different aspects of method 700according to embodiments of the present invention.

FIG. 9 shows a plot for a functional approximation describing therelationship between the zoom position of the lens and the physical sizeof the sample in the image acquired by the camera according toembodiments of the present invention.

FIG. 10 is a flowchart illustrating a method for determining aneffective distance and focus based on an input of a sample sizeaccording to an embodiment of the present invention.

FIG. 11 is a flow chart illustrating a method of determining a size of abiological or chemical sample using an imaging system according toembodiments of the present invention.

FIG. 12A shows an imaging system operable to identify flat-fieldcorrections according to embodiments of the present invention.

FIG. 12B shows an example of a target 1220 for determining a flat-fieldcorrection of a lens according to embodiments of the present invention.

FIG. 13 is a flowchart illustrating a method of performing a flat-fieldcorrection for an imaging system for imaging biological or chemicalsamples according to embodiments of the present invention

FIG. 14 shows a block diagram of an exemplary computer apparatus usablewith system and methods according to embodiments of the presentinvention.

DETAILED DESCRIPTION

Biological and chemical samples often have a low contrast; therefore, anauto-focus camera will not work well. Accordingly, properties (e.g.location, color, intensity) of the light emitted or reflected from asample can be hard to determine. Even if one were to perform thefocusing manually, a user might not set the focus accurately, and thefocus might change from user to user and from one sample to another,thereby making the results not reproducible and inaccurate. Thesemeasurement errors can make it difficult to identify and/or characterizecertain molecules in a sample. One could require certain effectivedistances whose optimal focus is known, but then the sample might belarger than the available image, or too small to determine theproperties accurately.

Embodiments can calibrate and provide systems that provide accurateimages of biological/chemical samples. A calibrated imaging system canallow a user to obtain an optimal focus setting (position) for anyeffective distance (e.g. a zoom setting). Thus, a user can obtain anaccurate and reproducible image for any effective distance, which can inturn allow any desired image size, thereby also providing greateraccuracy since the sample can be imaged to a greater resolution. In oneembodiment, the optimal focus is determined from a functionalapproximation that defines a relationship between effective distance andfocus setting. Also, a user can input a size, and an imaging system candetermine the appropriate effective distance and focus. An imagingsystem can also determine a size based on any effective distance. Anaccurate flat field correction can also be determined.

The calibration can use specific targets at the location of a sample,which have higher contrast than the biological/chemical samples. Thesecalibration targets can also have features that are of known location orsize. Such calibration targets can be used to calibrate the imagingsystem to identify a focus of a lens (or other optical component) of thecamera, a zoom setting (or other effective distance) of the camera, asize of a sample, and a flat field correction for images of a sample.Some embodiments can provide a wizard to walk a user through thecalibration. One embodiment can perform the calibration from a singleactivation once a calibration target has been put into a samplelocation.

I. System

FIG. 1 shows an imaging system 100 for imaging chemical or biologicalsamples according to embodiments of the present invention. A camera 110is used to image a sample when it is placed at a sample location 105. Inone embodiment, camera 110 can include a two dimensional array detector,such as a charge-coupled device (CCD) or complementarymetal-oxide-semiconductor (CMOS) detector, for imaging the sample or acalibration target 140, which can also be placed at sample location 105.Calibration target 140 can be used to determine settings of a lens 120and can have particular features (e.g. a pattern) for the calibration.

In one embodiment, a light source is provided underneath the samplelocation to provide illumination of the sample. In another embodiment,the sample emits light (e.g. from a dye) so that a light source is notneeded. The light is transmitted from the sample through lens 120 tocamera 110. Imaging system 100 may be surrounded by an enclosure so thatlight other than from the light source is not received by camera 110.

In one embodiment, a distance 115 from lens 120 to sample location 105can be changed in order to provide greater resolution of a sample. Forexample, if the sample takes up most of the image taken, then morepixels (and thus more accuracy) can be dedicated to imaging the sample.However, one does not want to cut off part of the sample. In oneembodiment, the sample may be on a platform that may be elevated usinggears, a pulley system, blocks, or other mechanism as would be known toone skilled in the art. Camera 110 also may be moved, e.g., along amechanical system where positions can be quantified. Other opticalcomponents (e.g. mirrors) besides a lens may be used to focus on thesample.

In another embodiment, a distance 115 from lens 120 to sample location105 can be fixed, and lens 120 can be a zoom lens. Zoom lens 120 can beused to change the effective distance to sample location 105. Theeffective distance may correspond to a zoom setting, which makes thesample appear larger (thus closer) than it really is. The term“effective” distance can refer to an actual distance or the simulateddistance resulting from magnification. Although much of the followingdiscussion related to zoom settings, one skilled in the art willappreciate the applicability to changing an actual distance.

A controller 130 can be used to control the camera 110, and camera 110can provide information to controller 130. For example, controller 130can send commands and supplemental information to camera 130. Commandscan include open/close shutter, settings for the gain used in theimaging electronics, how a CCD is operating (e g binning), as well asother commands. In various embodiments, camera 110 can send tocontroller 130 status information (e.g. settings of camera), informationabout what the camera is doing, and images.

Controller 130 can be also used to control lens 120, which may be donealso through the connection with the camera 110. For example, controller130 can send commands to control zoom, focus, and iris settings. Lens120 can also send information to controller 130, such as statusinformation (e.g. a voltage describing a state of the lens). A voltagecan correspond to a position of a motor that is used to change a lenssetting. Thus, a particular voltage can correspond to a particularsetting. In one embodiment, respective voltages (digital or analog) foreach of zoom, focus, and iris are sent from lens 120 to the controller.To obtain a particular setting, controller 130 can send commands to movea motor, receive the corresponding voltage as it changes, and use thevoltage to determine when to provide a stop command when the desiredsetting (voltage) is obtained. In one embodiment, an analog-to-digitalconverter receives an analog voltage from the motor and converts it to adigital voltage value for processing by controller 130. The convertercan be in lens 120 or in controller 130. As part of a calibration,controller 130 can obtain the minimum and maximum voltages for eachmotor. These voltages can also be used so the controller does not breakthe motor by trying to make it operate beyond its workable range.

Controller 130 can process images and may also move a mechanicalapparatus of the sample when distance 115 is variable. In oneembodiment, the controller is a standard computer. In anotherembodiment, the controller may be a specialized device with hardwiredcircuitry, e.g.

an application specific integrated circuit (ASIC) or a device with someprogrammability, such as a field programmable gate array (FPGA).

As a sample may be difficult to image, a calibration of the cameraand/or lens settings can be performed. In one embodiment, calibrationtarget 140 is a checkerboard pattern. In various embodiments,calibration target 140 can be used to determine a focus setting for aparticular effective distance, used to determine a size for a particulareffective distance, or an effective distance for a particular size.Other targets may be used for flat fielding corrections.

II. Focusing

If the effective distance to the sample location changes, the focus ofsetting of lens 120 will need to change. One can manually determine thefocus, but this is time consuming and is not reproducible, someasurements may be different each time. Alternatively, one can usepredetermined effective distances with specific focus settings for theseeffective distances. But, then the imaging system is limited to thepredetermined effective distances. In such cases, a predeterminedeffective distance might cause the sample to be a relatively small partof the image (and thus have relatively low resolution of the sample), orthe sample could be larger than the maximum image size. Accordingly,embodiments can provide for accurate and reproducible focus settings forany effective distance.

A. Calibrating Imaging System to Use any Effective Distance

In some embodiments, a calibration process can measure an optimal focussetting for initial effective distances. These measured optimal focussettings can be used to determine optimal focus settings for othereffective distances. In one embodiment, the process of calibration isautomated, with a user simply setting up a calibration target andinitiating the calibration process. In another embodiment, a user canmanually perform certain steps. In one aspect, the automated method canprovide for greater reproducibility of images across samples.

FIG. 2A is a flowchart illustrating a method for calibrating an imagingsystem for imaging biological or chemical samples according toembodiments of the present invention. The method uses a calibrationtarget that has a higher contrast than the biological or chemicalsamples that are to be imaged.

In step 210, a plurality of initial effective distances is received. Theeffective distances are from a sample location (e.g. sample location105) to an optical component (e.g. lens 120) of the imaging system. Inone embodiment, the focus algorithm selects N effective distances (e.g.

zoom settings in the camera's zoom range). The N zoom settings may beequally spaced along the entire zoom range.

In step 220, an optimal focus setting of the optical component isidentified for each effective distance. In one embodiment, a calibrationtarget is placed at the sample location and used to determine theoptimal focus setting. In one aspect, the optimal focus setting can bedetermined at N zoom settings (e.g. 11) including the minimum andmaximum settings.

In step 230, means to determine a functional approximation of thedependence of the optimal focus setting on an effective distance isstored in a computer readable medium adapted to be communicably coupledwith the imaging system. The computer readable medium may be a permanentpart of the imaging system or may be removable. When communicablycoupled, the means allows the imaging system to determine an optimalfocus setting for any effective distance. FIGS. 2B and 2C below provideexamples of means for determining the functional approximation. Examplesof computer readable media include a random access memory (RAM), flashmemory including a flash drive, compact disc (CD), Digital VersatileDisc (DVD), or any other kind of memory storage device.

In step 240, a new effective distance, which is not one of the initialeffective distances, is received. In one embodiment, a new effectivedistance can be received from a user to image a biological/chemicalsample. The user might select the effective distance by changing thezoom setting until the sample fills approximately a sufficient portion(e.g. at least 90%) of the image. In one aspect, the sufficient portionis just along one dimension. In another aspect, the input effectivedistance can be estimated by a user using a non-optimal focus setting.Once the effective distance is input, the optimal focus setting can thenbe determined. In another embodiment, the new effective distance may besupplied by the imaging system itself, e.g., as described below formethod 1000 in FIG. 10.

In step 250, an optimal focus setting for the new effective distance isdetermined from the functional approximation. The functionalapproximation can provide a mapping from any effective distance (e.g.input by the user) to obtain an optimal focus setting for that effectivedistance. For example, the functional approximation can be a functionthat receives an effective distance as an input and provides the optimalfocus setting. In one embodiment, controller 130 can determine theoptimal focus setting. In another embodiment, another processing devicecommunicably coupled with controller 130 determines the optimal focussetting and provides the setting to controller 130. Controller 130 canthen send a command to lens 120 to obtain the optimal focus setting.

FIG. 3 shows a functional approximation 310 of effective distance (zoomposition) vs. focus position according to embodiments of the presentinvention. As shown, functional approximation 310 is a continuous curve;however, other representations may be used. Other examples include adiscontinuous function that has multiple continuous portions definedwithin non-overlapping segments (e.g. using finite element or finitedifference) or as M data points {zoom,focus}, where M is greater than N(the number of initial effective distances). Conceptually, any zoomposition can be selected and a corresponding optimal focus setting canbe determined from the plot. In one embodiment, curve 310 is defined asa formula (which can have multiple components) which provides a value onthe Y axis (focus position) for each value on the X axis (zoomposition).

In one embodiment, curve 310 is obtained by calculating a functional fitof the N data points of the initial effective distances and thecorresponding optimal focus settings. For example, a functional form maybe chosen (e.g. polynomial, sigmoid, wavelets, or finite difference)with parameters that are optimized based on a fit (e.g. least squares)of the functional form to the N data points. In another embodiment,curve 310 can be determined using interpolation (e.g. linear orquadratic interpolation), with defined functional forms that areconstrained to have the determined optimal focus settings at the initialeffective distances. An interpolation can use data points having initialeffective distances proximal (e.g. on either side of) an input effectivedistance. Other methods of determining any form of the functionalapproximation can include combinations of methods mentioned herein andother suitable methods of obtaining a functional approximation from aset of data points.

As an example, the initial zoom positions may be plotted vs. the optimalfocus positions, which may be performed by the controller 130. Focusvalues at zoom positions between the initial zoom positions may bedetermined using the functional approximation. In one aspect, theaccuracy of the intermediate values can be increased or decreased byusing more initial data points. In another aspect, the accuracy can beincreased by using more complex functions for the approximation (e.g.higher order polynomials or more wavelets).

In FIG. 3, curve 310 is shown between minimum and maximum zoompositions, which can correspond to the limits of the settings availableon the lens. The functional approximation could provide focus settingsfor zoom settings outside of the min/max range, but such positions maynot be able to be obtained with the zoom lens for which the calibrationis done. Different zoom lenses can provide different min/max ranges.

The means for determining the functional approximation can take onvarious forms. In one embodiment, the means can provide for calculatingthe functional approximation on the imaging system from the N datapoints for the initial effective distances. In another embodiment, thefunctional approximation may already be calculated, and the means canjust retrieve the functional approximation and input the new effectivedistance to determine the corresponding optimal focus setting.

FIG. 2B shows a method 260 of storing means for determining a functionalapproximation to the relationship of an effective distance to optimalfocus setting according to embodiments of the present invention. Method260 may be used to implement step 230 of method 200.

In step 231 b, an optimal focus setting for each initial effectivedistance is stored in a computer readable medium adapted to becommunicably coupled with the imaging system. In one embodiment, theoptimal focus settings may be determined by the imaging system, and thuscan be automatically stored in a permanent memory. In anotherembodiment, the optimal focus settings may be determined by a user andthen stored on the computer readable medium. Once the medium iscommunicably coupled with the imaging system, the optimal focus settingscan be used by the imaging system to determine the functionalapproximation. In one embodiment, the data points of {initial effectivedistance, focus setting} are stored as a table or other array.

In step 232 b, code and/or hardware is provided to determine thefunctional approximation from the stored data points of {zoom,focus}. Inone embodiment, software code is stored on permanent and/or removablecomputer readable media. The code may be stored on the same medium asthe data points. The code can be used by a processor of the imagingsystem to calculate the functional approximation using the data points.Various algorithms can be used to determine the functionalapproximation, e.g., interpolation, least squares fit to a polynomial,etc.

In another embodiment, the imaging system can have hardware that ishardwired (e.g. an ASIC) to use one or more algorithms (e.g. asmentioned herein) to calculate the functional approximation based on thedata points. In yet another embodiment, an imaging system can use bothsoftware and hardwired hardware. For example, the software code can beloaded as configuration data of an FPGA that contains ASIC parts.Similarly, a microprocessor can contain certain parts that are hardwiredto perform certain instructions.

FIG. 2C shows a method 270 of storing means for determining a functionalapproximation to the relationship of an effective distance to optimalfocus setting according to embodiments of the present invention. Method270 may be used to implement step 230 of method 200.

In step 231 c, a functional approximation to the optimal focus settingsvs. effective distance is calculated. The functional approximation maybe calculated as described above. In one embodiment, the calculation canbe performed by a computer that is not coupled with the imaging system.In another embodiment, the calculation can be performed by the imagingsystem.

The functional form can be represented in multiple ways. In oneembodiment, the functional approximation can be stored as a series ofdata points {zoom,focus}. These data points are more numerous than theinitial effective distances. In fact, in one embodiment, the number ofdata points can be equal to the number of possible settings of a zoomlens. These data points can also be used as a basis for thedetermination of another functional approximation (e.g. as done in step232 b). In another embodiment, the functional approximation can bestored as a set of parameters that define a function. For example, thecoefficients of one or more polynomials (or other functions) can bestored. When using interpolation or finite elements, there can bemultiple polynomials for different parts of the functionalapproximation.

In step 232 c, the functional approximation is stored in a computerreadable medium adapted to be communicably coupled with the imagingsystem. The imaging system can have program code and/or hardwirehardware that identifies and uses (e.g. in step 250 of method 200) thefunctional approximation. The program code can be stored in the samecomputer readable medium or in another computer readable medium, whichmay be a permanent part of the imaging system or be removable.

FIG. 3 also shows an offset functional approximation 320 that canaccount for a shift in the sample location. In some embodiments, thesample may be moved from the platform by a fixed distance (offset). Forexample, systems can have different heights because of differentillumination plates, which may provide a filter between a light sourceand the sample, where the light source is underneath the sample. In oneexample, the filter may change the spectrum of the light source to adesired spectrum. In these embodiments, the calculation of a focussetting for the new effective distance includes shifting the functionalfit based on an offset that results from shifting the sample by a fixeddistance.

In such circumstances, one does not want to redo the entire calibrationprocess. Accordingly, the offset functional approximation 320 can bedetermined from the functional approximation 310. In one embodiment,only one new data point is taken at the smallest effective distance(i.e. maximum zoom). The largest effective distance (minimum zoomsetting) is taken to have the same optimal focus setting as the curve310. The other focus settings are shifted based on a percentage of theparticular zoom setting with respect to the entire available range. Forexample, if the zoom has a range from 150 mm to 650 mm (a range of 500mm), a zoom position of 600 mm would have 90% of the change at 650 mm.Thus, if the change at 650 mm is from 570 to 620, then the focusposition at 600 would be 615. In other embodiments, a data point at thelargest effective distance can also be calculated. In one embodiment, aratio of optimal focus settings being preserved, e.g., a ratio includinga zoom setting relative to the shifted focus settings at the minimum andmaximum effective distances.

Functional approximation 320 (shown as a continuous curve) can provide afocus position at any arbitrary zoom position when the sample is offsetfrom an initial position. This offset method can also be applied toembodiments that move the actual distance of the sample. In theseembodiments, each of the initial distances would be shifted, but onlythe optimal focus setting at the shift for the closest distance needs tobe determined. The other shifted focus settings can be determined asmentioned above.

B. Finding Optimal Focus Setting

The determination of the optimal focus setting for a particular initialeffective size can be determined manually, or automatically. If doneautomatically with a computer, the imaging system or another computingdevice may be used. In one embodiment, the automatic determination of anoptimal focus setting for a particular effective distance uses anoptimization method for determining an extrema (i.e. a minimum ormaximum) of a focus contrast value. To obtain more accurate focussettings, a calibration target (e.g. 140) can be composed of one or morehigh contrast elements. A high contrast element can be placed such thatthere is at least one high contrast element always in the image. In oneembodiment, a high contrast element is an edge between a two object ofdifferent color, e.g., a black object and a grey object.

FIG. 4 is a flowchart of a method 400 for determining an optimal focusat a particular effective distance setting according to embodiments ofthe present invention. In one aspect, an optimal focus position of alens is determined by acquiring images across a range of focus settingsand calculating a focus contrast value (FCV) for each image, e.g. usinga pixel value histogram. The focus position with a smallest (or largestdepending on how FCV is defined) can be used as the optimal focusposition for the particular zoom setting. The discussion below isdirected to when the FCV is smallest, but can easily be applied to whenthe FCV is the largest.

Method 400 is performed at a fixed effective distance. For example, thelens is zoomed to a specific position. In one embodiment, the iris ofthe lens is opened completely during the acquiring of an image. The irisbeing fully opened can narrow the depth of field and help in determiningthe best focus position. An approximate auto exposure value may also beobtained. In one aspect, auto exposure is used to make sure that theacquired image has enough dynamic range to get good separation betweenthe black and grey pixel values. The auto exposure may be obtained, forexample, by determining the shutter speed or controlling the integrationtime on the photosensitive detector before reading out the signal.

In step 410, the focus setting of the lens (or other optical component)is moved from a minimum value to a maximum value, with images taken atvarious focus positions. Images may be acquired as quickly as possiblewhile the focus is changing. In one embodiment, the focus setting ismoved relatively quickly and is not held at a particular focus positionwhen the image is taken. In one aspect, the minimum and maximum valuesfor the focus setting may be the smallest and largest values that thelens can achieve. In another aspect, the minimum and maximum values cansimply values that are known or estimated to respectively be less thanand greater than the optimal focus setting.

In step 420, a focus contrast value (FCV) is determined for each image,which is taken with a different focus setting. Various types of FCVs maybe used, e.g., as described herein and as known to one skilled in theart. Each data point has an FCV and a focus setting. FIG. 5 shows a plot500 of the FCV vs. a focus setting (position) according to an embodimentof the present invention.

In step 430, a first focus position corresponding to a minimum FCV forthe quick minimum to maximum sweep is determined. In one embodiment, thefirst focus position can correspond to the one of the images used todetermine an image that has the FCV is a minimum. In another embodiment,a functional fit can be performed on multiple data points, with the fitbeing used to determine the minimum FCV and the corresponding focussetting. Thus, the first focus position may not be one of the focussettings used to obtain images in step 410.

In step 440, steps 410-430 are repeated except the focus setting ismoved from a maximum to a minimum focus, thereby obtaining a secondfocus position. The first and second focus positions will typically bedifferent. Either direction of sweep from minimum to maximum can be donefirst.

The first and second focus positions are rough estimates (and canprovide a range) for the optimal focus setting. Since the focus wasmoved quickly over a relatively large range, these values may not be asaccurate as desired. Thus, further refinement steps may be performed.

In step 450, the search for a minimum in the FCV is refined in theregion between the first and the second focus positions determined insteps 430 and 440. The refinement can proceed in various ways.

In some embodiments, the focus setting is moved slowly between the firstand the second focus positions determined in steps 430 and 440. In oneaspect, this range is less than the minimum to maximum range. The focussetting is moved slowly to provide greater accuracy. A third focusposition corresponding to a minimum FCV is determined for this sweep offocus settings. The focus setting is also moved slowly in the oppositedirection to obtain a fourth focus position corresponding to a minimumFCV. An average of the third and fourth focus positions is calculated.This average can be taken as the optimal focus position at the specifiedzoom position. Alternatively, the process can proceed further withanother sweep between the third and fourth focus positions, and so on,and an average of a final one of the focus settings can be used.

In other embodiments, images are taken at setting obtained while thefocus is held fixed (i.e. not changing from one focus to another). Theresulting values can then used to find smaller and smaller ranges forthe optimal focus setting. In one embodiment, the search is binarysearch that split the range in half after each step. For example, theFCV of the first and second focus positions is used along with FCVs atthree other focus positions of 25%, 50%, and 75% of the range. The FCVsat the first and second focus positions can be taken again, as this timethe focus would be stopped at these settings. From these five points, itcan be determined whether the minimum is in the first half or the secondhalf of the range, e.g., by identifying which of the 25% point and 75%point has a lower FCV, by using an average the two pairs of points notincluding the center point, or by using a functional fit.

This process can repeat until a desired accuracy is achieved. In variousembodiments, the desired accuracy can be based on an absolute value ofthe FCV, change in the FCV, and resolution of the voltage returned fromthe lens. For example, if the difference between the digital values forthe voltages of two points is 1, then the focus setting cannot bedetermined to any greater detail.

In one embodiment, using a calibration target with two colors can helpto provide an image that can provide a parabolic shape to the focus vs.FCV curve, as opposed to curve with multiple minimums. Other embodimentscan use other optimization methods for determining the focus settingwith an optimal FCV.

C. Calculation of Focus Contrast Value

In one embodiment, the FCV is determined using a calibration target thatis 50% of one color and 50% of another color. For example, one color maybe black (or almost black) and the other color white (or almost white).A checkerboard pattern mentioned above may be used if the resultingimage is centered properly. If the colors are black and white, amonochromatic scale may be used to determine the color of each pixel.

FIG. 6A shows a histogram 600 of pixel intensity (in a monochrome scale)vs. pixel count for an unfocused image according to embodiments of thepresent invention. In some embodiments, a centroid 610 may be determinedfor each image. Centroid 610 can be an integer or fractional pixelintensity that corresponds to the average or median intensity. In oneembodiment, centroid 610 may be determined as a weighted average ofpixel intensities, where the weighting corresponds to the number ofpixels with the particular intensity. In another embodiment, centroid610 is the median pixel intensity for all of the pixels. The centroidcan be different for each image.

A centroid range 620 can be centered around centroid 610, e.g. a fixedamount of pixel intensity or a percentage of the maximum intensity, suchas +or −5%. In one embodiment, an area 630 under the histogram curve 600for the centroid range 620 is taken as the FCV. This area can correspondto the number of pixels in range 620 centered around centroid 610. Thus,the FCV can be the total points inside that range. In one aspect, therange can be the same width for each image. Using the centroid range620, the FCV for the image may be calculated for each image.

As shown in histogram 600, the centroid 610 is somewhat in the middle ofthe entire pixel intensity range. Thus, the most common intensity isabout half intensity, or a color of grey. Since the target has onlyblack and white, this histogram exhibits the characteristics of anunfocused image.

FIG. 6B shows a histogram 650 of pixel intensity (in a monochrome scale)vs. pixel count for one or more focused images according to embodimentsof the present invention. As one can see, the amount of area 630 underthe histogram curve 650 for the centroid range 620 is much smaller thanfor the histogram curve 600. This is a result of greater separation ofthe two colors, and thus better contrast resolution and focus.

In another embodiment, the separation of pixel intensity of the twopeaks may be used as the FCV. In such embodiments, a maximum of the FCVwould correspond to the optimal focus setting. Yet another embodimentcould use the height of the two peaks.

III. Sizing

The section above described a mapping of effective distance to focussetting. However, the appropriate effective distance may not be easilyknown. Thus, some embodiments can also provide mechanisms fordetermining an appropriate effective distance. Certain embodiments canalso provide a mechanism for determining the size of a sample, e.g., tohelp perform a structural analysis of the sample.

A. Mapping of Size to Effective Distance

A size algorithm can determine the image dimensions at each of theinitial effective distances. In one embodiment, the number K of imagepixels spanning a given target feature of known size L is determined,and the length (or other size) per image pixel can be calculated as K/L.The size per image pixel can then be multiplied by the number of pixelsin the x and y axes of the image sensor to provide an overall size ofthe image. An imaging system can also determine a number of pixels for acertain part of an image, and then determine the size based on K/L. Oneskilled in the art will appreciate other methods of determining a sizefrom a target feature of known size. The resulting sizes can be plottedvs. each effective distance, and sizes at intermediate effectivedistances can be determined in a similar manner as the focus settings.Thus, a functional approximation for the relationship between size andeffective distance can be determined.

FIG. 7 is a flowchart illustrating a method 700 for determining afunctional approximation for the relationship between an effectivedistance and size of a sample according to embodiments of the presentinvention. Method 700 can use a calibration target with objects of knownsize, e.g. the distance between two features (e.g. edges) is known. Forexample, a test pattern comprised of a checkerboard pattern of twovarying grayscale intensities is used, such as black and 40% gray (Seelabel 1 of FIG. 8); however, other shaped objects and features may beused. Once pixels corresponding to those features are identified, thesize of the image (and any image taken at the effective distance) can bedetermined.

In step 710, an image of the calibration target is taken at a specificeffective distance (e.g. zoom position), e.g. using an optimal focusdetermined in method 200. An object of known size can be placed suchthat there is at least one object always in the image for any effectivedistance. Thus, the image can be analyzed to identify the object ofknown size. In one embodiment, the specific effective distance may beone of the initial effective distances used in method 200. In anotherembodiment, the specific effective distance is not one in which anoptimal focus setting has been directly determined, but which isdetermined using a functional approximation of optimal focus setting asa function of effective distance.

In step 720, the edges of at least one of the objects in the image areidentified for the image in step 710. In FIG. 8, the edges can be theedges of a black box or a grey (whitish) box. In other embodiments, theedges of other objects or any two other features may be used. An edgemay be identified as the pixel(s) where a certain change in contrastoccurs. For example, a pixel can be identified where the change in pixelintensity is most abrupt. In other embodiments, the features can be themiddle of the boxes. The middle can be identified as a maximum orminimum in the intensity.

To identify the edges, one embodiment creates a horizontal or verticalpixel profile (intensity values) at an arbitrary y or x-position in theimage. Line 810 of FIG. 8 shows a line along which a pixel profile 820is created. For a monochromatic calibration target, pixel profile 820can be proportional (directly or inversely) to pixel intensity. In FIG.8, the relationship is inverse as the highest values are where the backboxes are. In one aspect, horizontal profiles that start exactly at themiddle of the image can be used. Based on the profile, an edge may bedetermined.

In one embodiment, a second derivative of the profile is determined. Thepoint where the second derivative is zero (e.g. changes sign frompositive to negative, or vice versa) can be identified as an edge. Thesecond derivative can be determined using any finite difference formula.For example, the pixel where the change in intensity between theprevious pixel is smaller than the change in intensity form the pixel tothe next pixel.

In another embodiment, the average pixel intensity 830 of the pixelprofile can be calculated and used. For example, the contrast edges canbe found by checking each pixel value of the profile for one of thefollowing criteria: (1) The pixel value left of the current pixel in theprofile is smaller than the average value and the pixel value right ofthe current pixel in the profile is larger than the average value; (2)The pixel value left of the current pixel in the profile is larger thanthe average value and the pixel value right of the current pixel in theprofile is smaller than the average value. In some instances, twodifferent pixels can correspond to the edge, e.g., when no pixel has theaverage intensity value. In such case, the one closest to the averagecan be chosen, or either one can be chosen.

Referring back to FIG. 7, in step 730, a number of pixels between theedges (or other features) is determined. In one embodiment, the numberof pixels between two edges may simply be counted. This number of pixelsmay be determined for several objects and then averaged to provide thedetermined number of pixels.

FIG. 8 shows the spacing 840 between neighboring edges. In oneembodiment, a standard deviation of the spacing may be used to detecterrors. For example, to avoid cases of invalid pixel profiles (e.g.horizontal profiles which are near a vertical edge) the standarddeviation should be small (e.g. less than 2.5%). In case of an invalidpixel profile, a different pixel profile (e.g. a horizontal profilealong a next adjacent y pixel position) is chosen.

In step 740, a length is correlated to a pixel. This may be done bydividing the known distance between the edges by the number of pixelsdetermined to be between the edges, thereby providing a length perpixel. Equivalently, a number of pixels per length may also be obtained.The known distance (e.g. a distance between the features on thecalibration target) may be received, e.g., by controller 130, from amemory or via input by a user. In one aspect, the distance between eachobject can be the same, e.g., each checkerboard box can have the lengthof 0.5 cm.

In step 750, a total size (e.g. length) is calculated based on a totalnumber of pixels fro the image at the current effective distance. In oneembodiment, the image area (or length) per image pixel is multiplied bythe number of pixels in the x and y axes of the image sensor. Thecalculation can be performed by the controller 130, by another computerin the imaging system, or by an external computer.

In another embodiment, the number of entirely visible checkerboard boxesis calculated. The number of entirely visible boxes can be determined asthe number of edges minus one. The size of the partly visiblecheckerboard at the beginning and the end of the profile may beestimated based on the number of pixels remaining The physical size(e.g. length) of the image is the sum of the entirely visiblecheckerboard boxes and the two partly visible checkerboard boxes.

In yet another embodiment, a calculated distance from the first/lastedge to the image border may be divided by the spacing betweenneighboring edges, thereby providing a percentage of the box that ispartly visible. For example, if the distance from the beginning to thefirst edge is 40 pixels and the spacing between two neighboring edges ison average 100 pixels, only 40% of the first checkerboard is visible.Since the size of the checkerboards is known, the physical size of thepartly visible checkerboards can be calculated, e.g., 40% of 0.5 cm is0.2 cm.

In yet another embodiment, the physical size of a subarea of the image(e.g., not one of the known objects) is calculated. For example, halfthe image width and height in the center of the image can be used. Thephysical size of the entire image is calculated by multiplying the sizeof the subarea by the number of pixels of the entire image divided bythe number of pixels in the subarea. Any combination of the aboveembodiments may be used, as well as other methods as would beappreciated by one skilled in the art.

In step 760, it is determined whether any more effective settings need asize to be determined. If so, the method repeats steps 710-750 for theseother effective distances. In one aspect, N images are acquired at Nzoom positions (and associated focus settings) equally spaced along thezoom range. In some embodiments, the corresponding size (e.g. length)for each effective distance can be stored in a computer readable mediumadapted to be communicably coupled with the imaging system. In oneembodiment, the computer readable medium can be part of controller 130.

In step 770, a functional approximation for the relationship of size toeffective distance is determined from the data points of {size, initialeffective distance}. The functional approximation can be calculated inany of the ways described above for the functional approximation offocus to effective distance. Means for determining this functionalapproximation can also be stored on a computer readable medium in asimilar fashion.

FIG. 9 shows a plot for a functional approximation 910 describing therelationship between the zoom position of the lens and the physical sizeof the sample in the image acquired by the camera according toembodiments of the present invention. Functional approximation 910 canprovide a mapping of any size to effective distance, and vice versa.

B. Using an Input Size to Determine Effective Distance and Focus Setting

The mapping of size to effective distance from method 700 may be used inconjunction with method 200 to allow the focus and effective distance tobe determined based on a user input of the size of the sample. If a userknows the size of a sample, the user does need to manually estimate theappropriate size. Also, in some embodiments, the user can communicatethe appropriate sample size to the imaging system. The user can inputwhich gel is being used, and the imaging system can correlated it to aknown size, which can then in turn be used to determine the effectivedistance and focus settings. In one embodiment, the settings for theinput gel can be saved for later use.

FIG. 10 is a flowchart illustrating a method 1000 for determining aneffective distance and focus based on an input of a sample sizeaccording to an embodiment of the present invention. In step 1010, asample size is received at an imaging system (e.g. system 100). Thesample size may be received from a user as a value or as anidentification of the type of container in which the sample resides,which can then be cross-referenced to size. For example, the user caninput the size as an area or length. The sample size can correspond to asize of the image needed to accurately analyze the sample. For instance,the user may provide an input sample size that is technically largerthan the actual sample, but just enough to ensure that the entire sampleis imaged. In one aspect, the input sample size may not be one of theinitial effective distances, e.g., as used in method 700.

In step 1020, the imaging system determines a functional approximationof an effective distance to a size of a sample. The functionalapproximation can be determined in various ways as described herein,e.g., as mentioned for FIGS. 2 b and 2C. In one embodiment, thefunctional approximation can be retrieved from a permanent or removablecomputer readable medium. In another embodiment, the functionalapproximation can be calculated based on a set of data points includingthe initial effective distances and the corresponding sizes, which maybe determined as described above in method 700.

In step 1030, an effective distance that corresponds to the sample sizebased on the mapping is determined. This effective distance may bedetermined by evaluating the functional approximation for the inputsize. For example, curve 910 in FIG. 9 can be used to determine the zoomposition as the input physical size. Such a determination can involveinputting the size into a function and receiving a zoom position. Asmentioned above, the mapping may be one-one or many-one. For instance,if the functional approximation is stored as a set of finite data points(as opposed to parameters of a piece-wise continuous function), then anyof the input sizes closest to a size in the data appoints can map to thesame corresponding effective distance.

In step 1040, a focus setting is selected based on the determinedeffective distance. The focus setting may be determined based on afunctional approximation of the effective distance to a focus setting,e.g., as determined via method 200. Thus, a user can simply input asample size (as a number or as an identifier of a container of knownsize), and the imaging system can adjust the optical components toaccurate settings.

C. Using the Mapping to Determine a Size of the Sample

The mapping of size to effective distance may also be used to provide asample size (e.g. a size legend) to an end user of an imaging system.FIG. 11 is a flow chart illustrating a method 1100 of determining a sizeof a biological or chemical sample using an imaging system according toembodiments of the present invention.

In step 1110, an input effective distance between an optical componentof the imaging system and a sample is received. For example, a user canchange the zoom on a lens until the sample can be fully viewed in theimage. This zoom setting can then be used as the input effectivedistance.

In step 1120, a functional approximation of effective distance to sizeis obtained. The functional approximation can be determined in any ofthe ways described above. For example, it can be read from a computerreadable medium (e.g. a non-volatile memory) coupled with controller130, or determined by controller 130 from initial data points read fromthe memory.

In step 1130, the size that corresponds to the input effective distanceis determined based on the functional approximation. As mentioned above,in one embodiment, multiple sizes can correspond to the input effectivedistance. In other embodiments, a size may uniquely correspond to onevalue of the input effective distance.

In step 1140, the size is displayed to a user. For example, the imagingsystem may have a monitor or other display screen for showing the samplewith the size marked. In one embodiment, the size may be provided as alegend that equates a size of the screen to a size of the sample. Inanother example, the imaging system can print the size.

IV. Flat Field Corrections

In imaging the molecules of a sample, it is desired to have uniformsignal response over the whole imaging area. That is two pointsproviding equal amounts of light should be imaged to have the samebrightness. Such uniformity can provide greater accuracy in identifyingand characterizing the molecules. However, lenses and illuminationsources can cause certain points, typically along the edges, to not haveequal brightness as other points. Certain embodiments can correct forthis effect by imaging a flat-field target that has substantiallyuniform brightness properties and then calculating the correction factorfor each pixel so that all pixels have the same brightness. U.S. Pat.No. 5,799,773 provides examples of correction factors that can be used.

A. For Samples Illuminated with a Light Source

FIG. 12A shows an imaging system 1200 with a flat-field target 1210 thatcan be used to determine a flat-field correction for a lens and lightsource according to embodiments of the present invention. In oneembodiment, the flat-field target 1210 is a UV transilluminator that isa sheet of luminescent (e.g. fluorescent) material with substantiallyuniform luminescent properties when illuminated by a uniform lightsource. An image of the target 1210 can be taken, and then differencesfrom uniformity can be used to correct images of samples.

The target 1210 may be positioned on the imaging platen over a lightsource during acquisition of a flat-field model image. Although thetarget may be constructed to be substantially uniform luminescentproperties when illuminated by a uniform light source, the light sourcemay not be uniform. The target 1210 can be used modeling both a givenlight source and lens non-uniformity as both will be captured by animage.

B. For Samples not to be Illuminated with a Light Source

FIG. 12A also shows an imaging system 1200 with a flat-field target 1220that can be used to determine a flat-field correction of a lensaccording to embodiments of the present invention. In one embodiment,the flat field target 1220 for modeling only lens non-uniformity is asheet of luminescent (e.g. fluorescent) material with substantiallyuniform luminescent properties. This target can be placed in closeproximity to the zoom lens, well inside the minimal operating distanceof the lens focal range, when acquiring a flat field model image.

FIG. 12B shows an example of a target 1220 for determining a flat-fieldcorrection of a lens according to embodiments of the present invention.A fluorescent piece of plastic 1222 with a filter 1224 to attenuate thelight may be attached to the front of the glass of the lens. Thefluorescent plastic 1222 is illuminated from below with ultravioletlight. As the fluorescent plastic 1222 is relatively far from the lightsource, the non-uniformities in the light source may be minimal.

In one embodiment, the target 1220 is a cap that fits over or onto thelens. In another embodiment, the target is supported by another deviceor hangs off the lens. The target 1220 can be close to the lens so as tobetter approximate non-uniformities in the lens. In one implementation,the target is close enough so that the field of the lens is filled withthe light from the target, and the target is out of focus. For example,a focus of the lens can be set on the light source, and an image of theluminescence target is created at the set focus. A flat field correctioncan then be calculated for the created image.

C. Flat Field Calibration for Multi-Zoom System

FIG. 13 is a flowchart illustrating a method 1300 for performing a flatfield correction of an imaging system for imaging biological or chemicalsamples according to an embodiment of the present invention. Method 1300can acquire a flat-field model image at each of the initial zoompositions using the corresponding optimal focus settings. However, otherzoom settings with optimal focus settings determined from an functionalapproximation (e.g. as described above) may be used. Method 1300 may beperformed independently for corrections to sample images that areobtained with a light source and to sample images that to be obtainednot using a light source. Flat field model images at intermediate zoomvalues may be determined from a functional approximation of zoom settingvs. flat-field correction, e.g., a pixel value interpolation between theflat field model images of the two closest zoom positions. Thus, theflat-field correction may be obtained for any effective distance.

In step 1310, a flat field correction is determined for each of aplurality of initial effective distances from an optical component ofthe imaging system to a sample. For example, a flat-field correction canbe determined at each of N zoom positions, which may be equally spacedalong the zoom range. In embodiments where target 1210 is used, thetarget 1210 may be placed in the sample location and thus it should bein focus for a particular effective distance when the correspondingoptimal focus position is used. In embodiments where target 1220 isused, the light source can be place at the sample location.

In one embodiment, the flat-field correction includes a value at eachpixel of the image. The correction can be calculated as a multiplicationvalue needed to ensure a uniform image. For example, if the averageintensity is M, then the correction for a pixel can be determined as Mdivided by the intensity at that pixel for the flat-field image. In thismanner, pixels that are too bright (i.e. brighter than average) aremultiplied by a number less than one, and pixels that are less brightare multiplied by a number greater than one.

In step 1320, a functional approximation for the relationship betweenthe flat-field correction and corresponding effective distances iscalculated. In one embodiment, the functional approximation is performedindependently for each pixel. For example, a separate functionalapproximation is performed for each pixel using the values of theflat-field corrections from 1310 for that pixel. Each functionalapproximation may be computed via any of the methods described herein,e.g., using means stored on a computer readable medium.

In step 1330, an input effective distance that is not one of the initialeffective distances is received. In one embodiment, the input effectivedistance is received from the user. In another embodiment, the inputeffective distance is determined from an input of sample size, e.g. asmay be done via method 1000.

In step 1340, an image is acquired at the input effective distance. Inone embodiment, the image is acquired using an optimal focus for theinput effective distance as determined using method 200. The image canconsist of a set of pixel values, each of which may be corrected withthe flat-field correction.

In step 1350, the flat-field correction for the input effective distanceis determined using the functional approximation. For example, the inputeffective distance may be input into a function, which provides thecorresponding flat-field correction for each pixel of the image. In oneembodiment, a specific flat-field is synthetically created at an inputzoom setting by interpolation between the two appropriate flat fieldimages acquired in 1310. Thus, the flat-field corrections for each pixelmay be determined for any zoom setting.

In step 1360, the determined flat field correction is used to create acorrected image of the sample. For example, each pixel of the acquiredimage may be multiplied by the corresponding flat-field correction forthe input effective distance. In one embodiment, controller 130 may beused to determine the corrected image.

FIG. 14 shows a block diagram of an exemplary computer apparatus 1400usable with system and methods according to embodiments of the presentinvention. The computer apparatus may utilize any suitable number ofsubsystems. Examples of such subsystems or components are shown in FIG.14. The subsystems shown in FIG. 14 are interconnected via a system bus1475. Additional subsystems such as a printer 1474, keyboard 1478, fixeddisk 1479, monitor 1476, which is coupled to display adapter 1482, andothers are shown. Peripherals and input/output (I/O) devices, whichcouple to I/O controller 1471, can be connected to the computer systemby any number of means known in the art, such as serial port 1477. Forexample, serial port 1477 or external interface 1481 can be used toconnect the computer apparatus to a wide area network such as theInternet, a mouse input device, or a scanner. The interconnection viasystem bus allows the central processor 1473 to communicate with eachsubsystem and to control the execution of instructions from systemmemory 1472 or the fixed disk 1479, as well as the exchange ofinformation between subsystems. The system memory 1472 and/or the fixeddisk 1479 may embody a computer readable medium.

The specific details of particular embodiments may be combined in anysuitable manner without departing from the spirit and scope ofembodiments of the invention. However, other embodiments of theinvention may be directed to specific embodiments relating to eachindividual aspect, or specific combinations of these individual aspects.

It should be understood that the present invention as described abovecan be implemented in the form of control logic using hardware and/orusing computer software in a modular or integrated manner. Based on thedisclosure and teachings provided herein, a person of ordinary skill inthe art will know and appreciate other ways and/or methods to implementthe present invention using hardware and a combination of hardware andsoftware.

Any of the software components or functions described in thisapplication, may be implemented as software code to be executed by aprocessor using any suitable computer language such as, for example,Java, C++ or Perl using, for example, conventional or object-orientedtechniques. The software code may be stored as a series of instructions,or commands on a computer readable medium for storage and/ortransmission, suitable media include random access memory (RAM), a readonly memory (ROM), a magnetic medium such as a hard-drive or a floppydisk, or an optical medium such as a compact disk (CD) or digitalversatile disk (DVD), flash memory, and the like. The computer readablemedium may be any combination of such storage or transmission devices.

Such programs may also be encoded and transmitted using carrier signalsadapted for transmission via wired, optical, and/or wireless networksconforming to a variety of protocols, including the Internet. As such, acomputer readable medium according to an embodiment of the presentinvention may be created using a data signal encoded with such programs.Computer readable media encoded with the program code may be packagedwith a compatible device or provided separately from other devices(e.g., via Internet download). Any such computer readable medium mayreside on or within a single computer program product (e.g. a hard driveor an entire computer system), and may be present on or within differentcomputer program products within a system or network. A computer systemmay include a monitor, printer, or other suitable display for providingany of the results mentioned herein to a user.

The above description of exemplary embodiments of the invention has beenpresented for the purposes of illustration and description. It is notintended to be exhaustive or to limit the invention to the precise formdescribed, and many modifications and variations are possible in lightof the teaching above. The embodiments were chosen and described inorder to best explain the principles of the invention and its practicalapplications to thereby enable others skilled in the art to best utilizethe invention in various embodiments and with various modifications asare suited to the particular use contemplated.

A recitation of “a”, “an” or “the” is intended to mean “one or more”unless specifically indicated to the contrary.

All patents, patent applications, publications, and descriptionsmentioned above are herein incorporated by reference in their entiretyfor all purposes. None is admitted to be prior art.

What is claimed is:
 1. A method for calibrating an imaging system forimaging biological or chemical samples, the method comprising: for eachof a plurality of initial effective distances from an optical componentof the imaging system to a calibration target at a sample location,identifying an initial optimal focus setting of the optical component,wherein different initial effective distances correspond to differentinitial optimal focus settings of the optical component; and storingdata for the imaging system to determine a first functionalapproximation that is derived from the initial optimal focus settings ofthe optical component for the initial effective distances, the databeing stored in at least one non-transitory computer readable mediumthat is adapted to be communicably coupled with the imaging system,wherein the first functional approximation is operable for calculating anew optimal focus setting of the optical component for a new effectivedistance having a different numerical value that is not a numericalvalue of one of the initial effective distances, the new effectivedistance being from a biological or chemical sample to the opticalcomponent, the biological or chemical sample not being the calibrationtarget, and wherein the only value input to the first functionapproximation for calculating the new optimal focus setting of theoptical component is the numerical value of the new effective distance;determining a flat-field correction for each of the initial effectivedistances; and storing data for the imaging system to determine a secondfunctional approximation that is derived from the flat-field correctionsat the initial effective distances, the data being stored in the atleast one non-transitory computer readable medium that is adapted to becommunicably coupled with the imaging system, wherein the secondfunctional approximation is operable for calculating a flat-fieldcorrection for a new effective distance that is not one of the initialeffective distances, the new effective distance being from a biologicalor chemical sample to the optical component.
 2. The method of claim 1,further comprising: the imaging system receiving the new effectivedistance that is not one of the initial effective distances; the imagingsystem determining the first functional approximation using the datastored in the at least one non-transitory computer readable medium; andthe imaging system calculating a new optimal focus setting for the neweffective distance using the first functional approximation.
 3. Themethod of claim 1, wherein the data for determining the first functionalapproximation includes a formula defining the first functionalapproximation and program code for retrieving the formula.
 4. The methodof claim 1, wherein the data for determining the first functionalapproximation includes the initial optimal focus settings for eachinitial effective distance and program code for calculating the firstfunctional approximation.
 5. The method of claim 1, wherein theeffective distance settings are zoom settings for the optical component,and wherein the optical component is a lens.
 6. The method of claim 1,wherein the calibration target has a higher contrast than the biologicalor chemical samples.
 7. The method of claim 6, wherein identifying aninitial optimal focus setting of the optical component is performed bythe imaging system.
 8. The method of claim 1, further comprising: usingthe first functional approximation to determine an offset functionalapproximation that is to be used when a biological or chemical sample isoffset from the sample location; and storing data for the imaging systemto determine the offset functional approximation, the data being storedin the at least one non-transitory computer readable medium that isadapted to be communicably coupled with the imaging system.
 9. Themethod of claim 8, further comprising: for the offset of the smallestinitial effective distance, identifying an optimal focus setting of theoptical component; and determining the change in the optimal focussetting at the smallest initial effective distance and the offsetsmallest initial effective distance, and wherein using the firstfunctional approximation to determine the offset functionalapproximation includes shifting each optimal focus setting for eachinitial focus setting by respective amounts proportional to the change.10. The method of claim 1, further comprising: the imaging systemdetermining the second functional approximation using the data stored inthe at least one non-transitory computer readable medium; and theimaging system calculating a flat-field correction for the new effectivedistance using the second functional approximation; and using theflat-field correction to create a corrected image of the sample.
 11. Themethod of claim 10, wherein the second functional approximation includesa separate function for each pixel of the corrected image.
 12. Themethod of claim 1, further comprising: receiving an input effectivedistance that is not one of the initial effective distances, wherein thebiological or chemical sample fills at least a specified portion of theimage when the input effective distance is used; the imaging systemobtaining a mapping of any input value of effective distance to anoutput corresponding size, wherein the mapping is provided by a functionthat approximates a dependence of size on effective distance; and theimaging system determining the size of the biological or chemical samplethat corresponds to the input effective distance based on the mapping.13. The method of claim 12, further comprising; the imaging systemproviding the size to a user.
 14. The method of claim 12, wherein themapping of effective distance to size is determined using a calibrationtarget, and wherein the calibration target includes at least one objectof known size, the method further comprising: for each of a plurality ofimages acquired at a plurality of initial effective distances, using anidentified initial optimal focus setting of the optical component todetermine a correlation of the known size to a number of pixels; basedon the correlation of the known size to a number of pixels, determininga size of the image; and storing data for the imaging system todetermine a functional approximation that is derived from the sizes atthe initial effective distances, the data being stored in the at leastone non-transitory computer readable medium that is adapted to becommunicably coupled with the imaging system, wherein the functionalapproximation is operable for calculating a size for a new effectivedistance that is not one of the initial effective distances.
 15. Themethod of claim 12, wherein the mapping is obtained by retrieving aplurality of initial effective distances and corresponding sizes foreach initial effective distance; using the initial effective distancesand corresponding sizes to determine the function that approximates thedependence of size on effective distance.
 16. The method of claim 15,wherein the function is determined using an interpolation between theeffective distances proximal to the input effective distance.
 17. Themethod of claim 12, wherein the input effective distance is the onlyinput value received for determining the size of the biological orchemical sample.
 18. A method for calibrating an imaging system forimaging biological or chemical samples, the method comprising: for eachof a plurality of initial effective distances from an optical componentof the imaging system to a calibration target at a sample location,identifying an initial optimal focus setting of the optical component,wherein different initial effective distances correspond to differentinitial optimal focus settings of the optical component; and storingdata for the imaging system to determine a first functionalapproximation that is derived from the initial optimal focus settings ofthe optical component for the initial effective distances, the databeing stored in at least one non-transitory computer readable mediumthat is adapted to be communicably coupled with the imaging system,wherein the first functional approximation is operable for calculating anew optimal focus setting of the optical component for a new effectivedistance having a different numerical value that is not a numericalvalue of one of the initial effective distances, the new effectivedistance being from a biological or chemical sample to the opticalcomponent, the biological or chemical sample not being the calibrationtarget, and wherein the calibration target has a higher contrast thanthe biological or chemical samples, and wherein the calibration targetincludes at least one object of known size; for each of a plurality ofimages acquired at the initial effective distances: using the identifiedinitial optimal focus setting of the optical component to determine acorrelation of the known size to a number of pixels; and based on thecorrelation of the known size to a number of pixels, determining a sizeof the image; and storing data for the imaging system to determine asecond functional approximation that is derived from the sizes at theinitial effective distances, the data being stored in the at least onenon-transitory computer readable medium that is adapted to becommunicably coupled with the imaging system, wherein the secondfunctional approximation is operable for calculating a new effectivedistance that is not one of the initial effective distances from a size.19. The method of claim 18, further comprising: the imaging systemreceiving a sample size from a user; the imaging system determining thesecond functional approximation using the data stored in the at leastone non-transitory computer readable medium; determining an effectivedistance that corresponds to the sample size based on the secondfunctional approximation; and using the first functional approximationto select a focus setting based on the determined effective distance.20. The method of claim 19, wherein the effective distance and optimalfocus setting are automatically adjusted, by the imaging system, to bethe determined effective distance and the selected focus setting. 21.The method of claim 18, wherein determining a correlation of the knownsize to a number of pixels includes: for each of the plurality of imagesacquired at the initial effective distances: determining a distancebetween two features of the at least one object of known size;identifying the two features in the image; identifying a number ofpixels between the features; and correlating a size to a pixel using theknown size and the number of pixels.
 22. An imaging system for imagingbiological or chemical samples, the imaging system comprising: anoptical component having a plurality of focus settings; a zoom lens forchanging a value of a new effective distance from the optical componentto a biological or chemical sample; at least one non-transitory computerreadable medium that stores: first data for the imaging system todetermine a first functional approximation that is derived from initialoptimal focus settings of the optical component for a plurality ofinitial effective distances from the optical component of the imagingsystem to a calibration target at a sample location, and second data forthe imaging system to determine a second functional approximation thatis derived from flat-field corrections at the initial effectivedistances, wherein the second functional approximation is operable forcalculating a flat-field correction for a new effective distance that isnot one of the initial effective distances; one or more processorsconfigured to map any value of effective distance to an optimal focussetting by: determining the first functional approximation from thefirst data stored in the at least one non-transitory computer readablemedium, and inputting a selected effective distance into the firstfunctional approximation to obtain the optimal focus setting, whereinthe effective distance is a zoom setting, wherein the selected effectivedistance is not one of a plurality of initial effective distances; and acontroller configured to set the optical component to have the optimalfocus setting that maps to the selected effective distance, wherein theone or more processors are further configured to: determine the secondfunctional approximation from the second data stored in the at least onenon-transitory computer readable medium; and inputting the selectedeffective distance into the second functional approximation to calculatethe flat-field correction; and using the flat-field correction to createa corrected image of the sample.
 23. The imaging system of claim 22,further comprising: an interface for receiving the selected effectivedistance from a user.
 24. The imaging system of claim 22, furthercomprising: an interface for receiving a sample size from a user,wherein the one or more processors are further configured to map anysample size to an effective distance, the sample size corresponding tothe selected effective distance, and wherein the means for changing theeffective distance is adapted to change the effective distance to theselected effective distance based on the mapping of the one or moreprocessors.
 25. The imaging system of claim 22, wherein the one or moreprocessors determine the first functional approximation by reading theinitial optimal focus settings for each of a plurality of initialeffective distances and calculating the first functional approximation.26. The imaging system of claim 25, wherein the controller is configuredto set the optical component to have a new optimal focus setting for anew effective distance that is not one of the selected effectivedistances by interpolating between optimal focus settings correspondingto initial effective distances proximal to the new effective distance.27. The imaging system of claim 22, the one or more processors arefurther configured to map any input sample size to an effectivedistance, and then map the effective distance to an optimal focussetting.
 28. The method of claim 1, wherein the focus setting defines aposition of a focusing lens within a camera.
 29. The imaging system ofclaim 22, wherein the second functional approximation includes aseparate function for each pixel of the corrected image.